package pers.cyw.oraclejavaproject.iodemo;

import java.io.*;
import java.util.Arrays;

public class FileDemo {
    public static void main(String [] ages){
        File f = new File("resource/e.txt");
        try(FileInputStream is = new FileInputStream(f);
            FileOutputStream os = new FileOutputStream("resource/11.txt");
        ) {
            byte [] buf = new byte[100];
            while(is.read(buf)!=-1){
                for(byte b :buf){
                    System.out.print((char)b);
                }
                os.write(buf);
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
